<template>
	<view>
		<u-grid :border="false" @click="click" align="center" style="margin-top: 20px;">
			<u-grid-item v-for="(baseListItem,baseListIndex) in baseList" :key="baseListIndex">
				<text class="grid-text">{{baseListItem.title}}</text>
			</u-grid-item>
		</u-grid>
		<u-divider text=""></u-divider>
		<view class="first" v-if="flag===0" align="center">
			<view class="mentaltest" v-for="(item,index) in testList ">
				<view style="margin-top: 30px;margin-left: 20px;">
					<image src="../../../../static/headicon.png" mode="" style="width: 30px;height: 30px;"></image>
				</view>
				<view style="margin-top: 30px;margin-left: 30px;">
					测试名称:{{item.name}}
				</view>
				<view style="margin-top: 30px;margin-left: 10px;">
					评分: {{item.score}}
				</view>
			</view>
		</view>
		<view class="second" v-else-if="flag===1">
			<view class="expertEvaluation" v-for="(item,index) in expertiseList" >
				<view>
					<view style="margin-top: 30px;margin-left: 30px;">
						<image src="../../../../static/expetise.png" mode="" style="height: 50px;width: 50px;"></image>
					</view>
					<view style="margin-left: 30px;">
						{{item.name}}
					</view>
				</view>
				<view style="margin-top: 30px;margin-left: 30px;">{{item.text}}</view>
				
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				flag: 0,
				baseList: [{
						title: '心理测评',
						color: 'black'
					},
					{
						title: '专家评估',
						color: 'green'
					}
				],
				testList:[{
					name:'PHQ测试',
					score:17
				},{
					name:'卡特尔十六因素人格测验',
					score:27
				},{
					name:'身心健康量表(UPI)',
					score:20
				},{
					name:'抑郁自评量表(SDS)',
					score:10
				},{
					name:'症状自评量表(SCL-90)',
					score:17
				}],
				expertiseList:[{
					name:'XXX',
					text:'对于已经确诊抑郁症的患者，应严格遵医嘱治疗，并坚持定期复诊，即使经治疗病情已得到有效控制。'
				},{
					name:'XXX',
					text:'当自觉有长期情绪低落、对凡事都提不起兴趣或是兴趣下降，甚至伴发反应慢、思维迟缓、记忆力下降等疑似抑郁症表现时，应及时求助医生.'
				},{
					name:'XXX',
					text:'药物是治疗抑郁症的主要治疗方法，提倡选用疗效好、安全性高的抗抑郁药。'
				},{
					name:'XXX',
					text:'抗抑郁药物治疗对抑郁心境及伴随的焦虑、紧张和躯体症状均有治疗效果，有效率可达60%~70%。'
				}]
			}
		},
		methods: {
			click(name) {
				// console.log(name)
				this.flag = name
				// this.$refs.uToast.success(`点击了第${name}个`)
			},
		}
	}
</script>

<style>
	.mentaltest {
		height: 80px;
		margin-left: 20px;
		margin-right: 20px;
		background-color: greenyellow;
		border: solid;
		display: flex;
		margin-bottom: 20px;
		/* position: relative; */
	}
	.expertEvaluation{
		height: 120px;
		border: solid;
		display: flex;
		margin-bottom: 40px;
	}
</style>
